<?php
/**
 * 分享
 * 
 * 调用方式：{:W,}
 *
 */
class ShareWidget extends Widget{
	public function render($data){
		if(!isset($data['data'])){
			$data['data'] = '';
		}
		if(!isset($data['currentUrl'])){
			$data['currentUrl'] = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
		}
		
		$tpl = isset($data['tpl'])?$data['tpl']:"Share";
		$content = $this->renderFile("./addons/widgets/".$tpl.".html",$data);
		return $content;
	}
}
?>